//
//  LHPasswordView.h
//  LHPassword
//
//  Created by YueHui on 16/2/19.
//  Copyright © 2016年 Leihou Software co. All rights reserved.
//

#import <UIKit/UIKit.h>

@class LHYPassword;

@protocol LHYPasswordDelegate <NSObject>
- (BOOL)password:(LHYPassword *)password checkingWithString:(NSString *)string;

- (void)password:(LHYPassword *)password remoteCheckingWithString:(NSString *)string;
@optional

@end

typedef NS_ENUM(NSInteger,LHYPasswordAnimationDirection) {
    LHYPasswordAnimationDirectionFromLeftOut,
    LHYPasswordAnimationDirectionFromRightOut,
    LHYPasswordAnimationDirectionFromLeftIn,
    LHYPasswordAnimationDirectionFromRightIn,
};
@interface LHYPassword : NSObject

/**
 *  密码框宽度
 */
@property (nonatomic, assign) float pwdWidth;
/**
 *  密码框个数
 */
@property (nonatomic, assign) float pwdCount;
/**
 *  密码框y坐标
 */
@property (nonatomic, assign) float pwdY;
/**
 *  动画时间
 */
@property (nonatomic, assign) NSTimeInterval duration;

@property (nonatomic, weak) id<LHYPasswordDelegate> delegate;

- (void)showWithAnimated:(BOOL)animated;
- (void)hideWithAnimated:(BOOL)animated;
- (void)showWithAnimated:(BOOL)animated direction:(LHYPasswordAnimationDirection)direction;
- (void)hideWithAnimated:(BOOL)animated direction:(LHYPasswordAnimationDirection)direction;

@property (nonatomic, assign, getter=isRemoteCheck) BOOL remoteCheck;
- (void)remoteCheckingWithResult:(BOOL)result;

@end
